package com.project.service;

import com.project.entity.Major;

import java.util.List;

/**
 * Created by WheelChen on 2017/5/2.
 */
public interface MajorService {
    /**
     * author: WheelChen
     * date: 2015-5-4
     * function: 增加专业
     * @param major
     * @return
     */
    int addOne(Major major);
    /**
     * author: WheelChen
     * date: 2017-5-4
     * function: 根据id删除专业
     * @param id
     * @return
     */
    int remove(Integer id);
    /**
     * author: WheelChen
     * date: 2017-5-4
     * function: 根据id修改专业
     * @param major
     * @return
     */
    int modify(Major major);
    /**
     * author: WheelChen
     * date: 2017-5-4
     * function: 根据id寻找专业
     * @param id
     * @return
     */
    Major findOne(Integer id);

    /**
     * author: WheelChen
     * date: 2017-6-22
     * function: 根据系id寻找专业
     * @param departmentId 系id
     * @return
     */
    List<Major> findBatch(Integer departmentId);

    /**
     * author: WheelChen
     * date: 2017/8/10
     * function: 检查专业是否已存在
     *
     * @param major
     * @return true - 存在 false - 不存在
     */
    boolean checkMajorIsExist(Major major);
}
